<?php
?>
    <!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<form action="">
    <input type="text" name="search">
    <input type="submit">
</form>
<table>
    @csrf
    <tr>
        <td>员工姓名</td>
        <td>所在部门</td>
        <td>请假原因</td>
        <td>请假起止日期</td>
        <td>审核状态</td>
        <td>操作</td>
    </tr>
    <tr>
        @foreach($data as $v)
        <td>{!! str_replace($search,"<span style='color:red'>$search</span>",$v->name) !!}</td>
        <td>{{$v->branch}}</td>
        <td>{{$v->password}}</td>
        <td>{{$v->time}}</td>
        <td>{{$v->state}}</td>
        <td><button>通过</button>
        <button>驳回</button></td>
    </tr>
    @endforeach

</table>
{{$data->appends(['search'=>$search])->links()}}
</body>
</html>
<script>

</script>
<script>

</script>
